This page last changed on Nov 16, 2005 by rossmason.

This example shows how to configure a Mule component read a File from a location and dispatch it over tcp but allowing the component to read the file first.

<mule-descriptor name="fileReceiverUMO"
    inboundEndpoint="file:///temp/myfiles/in?autoDelete=false&amp;amp;
                      moveToDirectory=/temp/myfiles/out"
    outboundEndpoint="tcp://localhost:12345"
    implementation="com.foo.TestFileComponent">
</mule-descriptor>

The inbound endpoint creates a file connector that listens on directory file:///temp/myfiles/in*, moves the file to *file:///temp/myfiles/out* and then forwards the java.io.File Object to the TestFileComponent so that it can read it. The *autoDelete flag tells Mule not delete or read the file.

The com.foo.TestFileComponent should read the file and return the result to dispatch over tcp://localhost:12345.

For more information about consuming and writing files see the File Provider.

For more information about configuring Tcp clients and servers see the Tcp Provider.

Document generated by Confluence on Nov 27, 2006 10:27